//
//  ZYBImageHelper.h
//  homework
//
//  Created by weiwang on 15/11/23.
//  Copyright © 2015年 zyb. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#import "SDWebImageManager.h"


@interface ZYBImageHelper : NSObject

//get pic's absolutePath
+ (NSString *)imageUrlWithPid:(NSString*)pid isBigImage:(BOOL)isBig;//默认为webp格式.
+ (NSString *)imageUrlWithPicUrl:(NSString *)picUrl;
+ (NSString *)imageUrlWithPid:(NSString *)pid isBigImage:(BOOL)isBig isWebp:(BOOL)isWebp;
+ (UIViewContentMode)imageContentModeWithImageSize:(CGSize)imageSize boundSize:(CGSize)boundsSize;

@end

@interface UIImageView (SDImageSwizzle)

- (void)setImageWithPid:(NSString*)pid isBigImage:(BOOL)isBig placeholderImage:(UIImage*)placeholderImage;

- (void)setImageWithPid:(NSString*)pid isBigImage:(BOOL)isBig placeholderImage:(UIImage*)placeholderImage completed:(SDWebImageCompletionBlock)block;

- (void)setImageWithPid:(NSString *)pid isBigImage:(BOOL)isBig placeholderImage:(UIImage *)placeholderImage cropAtTopLeft:(CGRect)cropRect;

- (void)setimageWithPicUrlX:(NSString *)picUrlX placeholderImage:(UIImage*)placeholderImage completed:(SDWebImageCompletionBlock)block;

@property (nonatomic, assign, readwrite) BOOL displayNotAnimated;
@property (nonatomic, assign) UIViewContentMode realContentMode;
@property (nonatomic, assign) UIViewContentMode placeholderImageContentMode;

@end
